<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>{$head[title]}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta content="{$head[keywords]}" name="keywords" />
<meta content="{$head[description]}" name="description" />
<base href="{SITE_URL}" />
<link href="favicon.ico" rel="shortcut icon" />
<link href="../skin/style.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="{$head[title]}" href="/rss.php?rssid={$catid}" />
<script language="JavaScript" src="misc/config.js"></script>
<script language="JavaScript" src="misc/jquery.min.js"></script>
<script language="JavaScript" src="misc/common.js"></script>
<script language="JavaScript" src="misc/validator.js"></script>
<link href="{SKIN_PATH}modal.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="images/js/jqModal.js"></script>
</head>
<body>

{template 'header.html'}

<div class="container">

	<script language="JavaScript">
	function search_submit()
	{
		if($('#title').val() =="")
		{
			$('#title').focus();
			alert("请填写您要搜索的问题.");
			return false;
		}
		document.wordform.action = '{$M[url]}search.php';
		document.wordform.keywords.value = document.wordform.title.value;
		document.wordform.submit();
	}
	</script>
	<div>
    <form name="wordform" action="{$M[url]}question.php" method="get">
    <input type="text" name="title" id="title" size="70" value="{$keywords}"/>
    <input type="submit" value="我要提问" /> 
    <input type="hidden" name="keywords" id="keywords"/>
    <input type="button" value="搜索答案" name="search" onClick="search_submit();" />
    </form>
      </div>
      
	<div class="aside">
    
    </div>
    
    <div class="main">
    	<div><a href="">首页</a><a href="{$M[url]}">问吧</a> 搜索结果</div>
        
        <div class="tag_menu">
          <ul>
            <li {if $status==5 || !$status && !$flag}class="selected"{/if}><a href="{$M[url]}search.php?status=5&keywords={$keywords}">已解决的问题</a></li>
            <li {if $status==3}class="selected"{/if}><a href="{$M[url]}search.php?status=3&keywords={$keywords}">未解决的问题</a></li>
            <li {if $flag==1}class="selected"{/if}><a href="{$M[url]}search.php?flag=1&keywords={$keywords}">投票中的问题</a></li>
          </ul>
        </div>
        <table cellpadding="0" cellspacing="0" class="table_list">
        <tr>
        <th>标题</th>
        <th width="50">回答数</th>
        <th width="80">提问者</th>
        <th width="110">提问时间</th>
        </tr>
        {loop $infos $n $r}
        <tr>
        <td>·<a href="{$M[url]}show.php?id={$r[askid]}" target="{$target}">{$r[title]}</a> <a href="{$CATEGORY[$r[catid]][url]}" style="color:gray">[{$CATEGORY[$r[catid]][catname]}]</a></td>
        <td>{$r[answercount]}</td>
        <td><a href="{url("?module=space&userid=$userid")}" target="_blank">{$r[username]}</a></td>
        <td>{date('Y-m-d H:i', $r[addtime])}</td>
        </tr>
        {/loop}
        </table>
        {if $pages}<p class="pagination">{$pages}</p>{/if}
    </div>


</div>
{template 'footer.html'}